<template>
  <div class="header">
    <div class="headerLeft" v-if="showArrow" @click="$emit('leftClick')">
      <slot name="left"></slot>
    </div>
    <div class="headerCenter"><slot>面经详情</slot></div>
    <div class="headerRight"><slot name="right"></slot></div>
  </div>
</template>

<script>
export default {
  props: {
    showArrow: {
      type: Boolean,
      default: true,
    },
  },
};
</script>

<style scoped lang="less">
.header {
  padding: 0 (10 / @vw);
  height: (50 / @vw);
  display: flex;
  align-items: center;
  //下边框线
  border-bottom: (1 / @vw) solid #f1f1f1;
  .headerCenter {
    flex: 1;
    text-align: center;
  }
}
</style>
